<template>
	<view class="overview-card">
		<view class="card-header">
			<text class="card-title">考试概况</text>
			<view class="info-icon">ⓘ</view>
		</view>
		
		<view class="overview-grid">
			<view class="overview-item">
				<text class="overview-number">{{ overviewData.examCount }}</text>
				<text class="overview-label">考试人数</text>
				<view class="overview-icon blue">📊</view>
			</view>
			<view class="overview-item">
				<text class="overview-number">{{ overviewData.averageScore }}</text>
				<text class="overview-label">年级平均分</text>
				<view class="overview-icon orange">🏆</view>
			</view>
			<view class="overview-item">
				<text class="overview-number">{{ overviewData.classCount }}</text>
				<text class="overview-label">班级数量</text>
				<view class="overview-icon green">📚</view>
			</view>
			<view class="overview-item">
				<text class="overview-number">{{ overviewData.highestScore }}</text>
				<text class="overview-label">年级最高分</text>
				<view class="overview-icon purple">💎</view>
			</view>
		</view>
	</view>
</template>

<script>
export default {
	name: 'ExamOverview',
	props: {
		overviewData: {
			type: Object,
			default: () => ({
				examCount: 50,
				averageScore: 400,
				classCount: 20,
				highestScore: 528
			})
		}
	}
}
</script>

<style lang="less" scoped>
@primary-color: #4DD0E1;
@secondary-color: #81C784;
@text-color: #333;
@text-light: #666;
@white: #fff;

.overview-card {
	background: @white;
	border-radius: 16rpx;
	padding: 24rpx;
	margin-bottom: 20rpx;
	box-shadow: 0 2rpx 16rpx rgba(0, 0, 0, 0.08);

	.card-header {
		display: flex;
		justify-content: space-between;
		align-items: center;
		margin-bottom: 20rpx;

		.card-title {
			font-size: 28rpx;
			font-weight: bold;
			color: @text-color;
		}

		.info-icon {
			width: 32rpx;
			height: 32rpx;
			border-radius: 50%;
			background: #e0e0e0;
			display: flex;
			align-items: center;
			justify-content: center;
			font-size: 18rpx;
			color: @text-light;
		}
	}

	.overview-grid {
		display: grid;
		grid-template-columns: 1fr 1fr;
		gap: 20rpx;

		.overview-item {
			display: flex;
			flex-direction: column;
			align-items: center;
			position: relative;
			padding: 20rpx;
			border-radius: 12rpx;
			background: #f8f9fa;

			.overview-number {
				font-size: 48rpx;
				font-weight: bold;
				color: @text-color;
				margin-bottom: 8rpx;
			}

			.overview-label {
				font-size: 22rpx;
				color: @text-light;
				margin-bottom: 12rpx;
			}

			.overview-icon {
				position: absolute;
				top: 16rpx;
				right: 16rpx;
				width: 40rpx;
				height: 40rpx;
				border-radius: 8rpx;
				display: flex;
				align-items: center;
				justify-content: center;
				font-size: 20rpx;

				&.blue { background: #E3F2FD; }
				&.orange { background: #FFF3E0; }
				&.green { background: #E8F5E8; }
				&.purple { background: #F3E5F5; }
			}
		}
	}
}
</style>
